package com.lanou.quanttradedata;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication
@EnableSwagger2
@MapperScan("com.lanou.quanttradedata.stock.mapper")
public class QuantTradeDataApplication {
    //spring容器
    public static ConfigurableApplicationContext context;
    public static void main(String[] args) {
        context = SpringApplication.run(QuantTradeDataApplication.class, args);
    }
    /**
     * 向spring注册RestTemplate工具
     * @return
     */
    @Bean
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }
}
